-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: Timestamp and Timeseries tests reorg (gh14854) #15301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
lgtm. the remainder of thanks! |
Wouldn't the remaining tests of |
@TrigonaMinima yes, sorry, that's what I meant! of course if you find say a period test or something, move to the appropriate place. |
Codecov Report@@ Coverage Diff @@
## master #15301 +/- ##
=======================================
Coverage 86.33% 86.33%
=======================================
Files 139 139
Lines 51149 51149
=======================================
Hits 44157 44157
Misses 6992 6992 Continue to review full report at Codecov.
|
ok a lot of the move into tests/series/test_timestamp.py was composed of things (that can be split out)
|
You meant It's still large though. |
@TrigonaMinima yeah. Need to separate pieces out as much as possible (though still may end up large). ok for now. I'll take a look and move more. |
pandas/tests/series/test_missing.py
Outdated
expected = expected.to_sparse() | ||
assert_series_equal(result, expected) | ||
|
||
def test_sparse_series_pad_backfill_limit(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forgot to mention, these sparse routines can go in
pandas/sparse/tests/test_series.py
pandas/tests/series/test_missing.py
Outdated
expected = expected.to_sparse() | ||
assert_series_equal(result, expected) | ||
|
||
def test_series_pad_backfill_limit(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anything backfill or interpolate can also do in pandas/tests/series/test_missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, I realized you already moved this, nvm!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are in test_missing only. Though there are some frame backfill routines which are in test_timeseries.py
. Should they be moved here as well?
expected = s[-2:].reindex(index).fillna(method='backfill') | ||
expected[:3] = np.nan | ||
assert_series_equal(result, expected) | ||
|
||
|
||
class TestSeriesInterpolateData(TestData, tm.TestCase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in fact this whole class can be moved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
already in test_missing 🙂
@TrigonaMinima just ping on green. I'll do a follow on this stuff to fix a couple of little points. If you can continue on to other things would be great! |
@TrigonaMinima don't push anymore to this. I have already taken your commit (and going to merge it soon), along with a bunch of other changes. |
Sure. When I pushed it there wasn't anything. Sorry for that. |
@TrigonaMinima if you are game, love to move timedelta and period in a similar way (e.g. move the scalar tests and index tests). you can create a e.g. for timedelta separate out the similar for period. |
also you can move |
and
do this after I merge (shortly) and separately from everything else as this will touch lots of things. |
@jreback sure. I just have a couple of questions-
Also, just clarifying, I should do timedelta changes in a different PR right? |
yes, leave this PR alone. timedelta is a separate PR. in theory everything should be under so in the scalar dir are e.g. a method/property of the tests dir should be almost self-explanatory, with it obvious where a new tests should go. there should be 1 and only 1 place. |
merged! |
Thanks. The explanation made things clearer. |
xref partial on pandas-dev#14854 Author: TrigonaMinima <[email protected]> Closes pandas-dev#15301 from TrigonaMinima/gh14854-timestamp and squashes the following commits: d8e3f4d [TrigonaMinima] splitting test_timeseries.py further 4072d93 [TrigonaMinima] TST: tseries/tests/test_timeseries.py tests moved to appropriate places. dbfd2ba [TrigonaMinima] TST: Timestamp tests compiled (gh14854)
test_timeseries.py
+test_tslib.py
->test_timestamp.py
)git diff upstream/master | flake8 --diff